package com.xinpu.service.impl;

import com.xinpu.dto.SalesRoleDto;
import com.xinpu.dto.SalesRoleNewDto;
import com.xinpu.mapper.SalesRoleMapper;
import com.xinpu.service.OwnService;
import com.xinpu.service.SalesRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * SalesRoleServiceImpl
 *
 * @author ayuan
 * @date 2021/5/8
 */
@Service
public class SalesRoleServiceImpl implements SalesRoleService {

    @Resource
    private SalesRoleMapper salesRoleMapper;


    /**
     * 销售角色列表
     *
     * @param tenantId
     * @return
     */
    @Override
    public List<SalesRoleDto> getList(String tenantId) {
        return salesRoleMapper.getList(tenantId);
    }

    @Override
    public List<SalesRoleNewDto> findList() {
        return salesRoleMapper.findList(OwnService.getLoginer().getTenantId());
    }
}
